/**
 * 
 */
package uk.co.altv.simpledb.filter;

import java.util.HashMap;

/**
 * @author niki
 *
 */
public class DomainFilter {
	@SuppressWarnings("unchecked")
	private HashMap<Class, IFilter> hints = null;

	/**
	 * @return the hints
	 */
	@SuppressWarnings("unchecked")
	public HashMap<Class, IFilter> getHints() {
		return hints;
	}
	/**
	 * @param hints the hints to set
	 */
	@SuppressWarnings("unchecked")
	public void setHints(HashMap<Class, IFilter> hints) {
		this.hints = hints;
	}
	/**
	 * @param hints
	 */
	@SuppressWarnings("unchecked")
	public DomainFilter(HashMap<Class, IFilter> hints) {
		this.hints = hints;
	}
	@SuppressWarnings("unchecked")
	public void setHint(Class target, IFilter filter) {
		if(this.hints == null) {
			this.hints = new HashMap<Class, IFilter>();
		}
		this.hints.put(target, filter);
	}
	@SuppressWarnings("unchecked")
	public IFilter getHint(Class target) {
		if(this.hints != null) {
			return this.hints.get(target);
		}
		return null;
	}
	@SuppressWarnings("unchecked")
	public void removeHint(Class target) {
		if(this.hints != null) {
			this.hints.remove(target);
		}
	}
}
